/**
 * Copyright (C) 2013-2014 the original author or authors.
 */
package com.foreveross.bsl.system.application.mobile;

import java.util.Map;

import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 * @description
 *
 * @author rening
 * @version v1.0
 *
 * @2013-6-7
 *
 */
@Path(value = "/mobile/accounts")
@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
public interface AccountMobileApplication {

	@GET
	@Path("/{id}")
	@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
	public Map<String, Object> getEntity(@PathParam("id") String sessionKey);
	
	@POST
	@Path("/login")
	@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
	public Map<String, Object> mobileLogin(@FormParam("appKey") String appKey, @FormParam("username") String username,
			@FormParam("password") String password, @FormParam("appId") String appId, @FormParam("deviceId") String deviceId);
	
	@POST
	@Path("/logout/{sessionKey}")
	@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
	public Map<String, Object> logout(@PathParam("sessionKey") String sessionKey);
	
}
